<?php
/**
 * File name   : service.php
 * Description : 客服中心控制器
 * Author      : Peng Feng(xxmc01@gmail.com) 
 */
//----------------------------------------------------
class Service extends Controller {

	function Service()
	{
		parent::Controller();
		$this->load->helper('cookie');
		$this->load->library('myfunction');   //载入自定义函数库
		$this->load->model('access_model');  //载入访客接入判断模型
		$this->load->model('article_model');  //载入文章模型
	}

	function index() {
		if ((!isset($_SESSION['siteinfo'])) || (count($_SESSION['siteinfo'])!=3)) {	//如果session里没有写入siteinfo信息
			$this->access_model->judgearea(); //判断访客地区（已写入session和cookie信息）
		}
		$data['baseurl']=base_url();
		$data['area']=$_SESSION['siteinfo']['area'];
		$data['areacode']=$_SESSION['siteinfo']['areacode'];
		$data['site']=$_SESSION['siteinfo']['site'];
		$data['head_info']="<link href=\"css/common.css\" type=\"text/css\" rel=\"stylesheet\"><link href=\"css/service.css\" type=\"text/css\" rel=\"stylesheet\">";//网页head区域信息
		$data['web_title']="好医生导医网——".$data['area']."站";//浏览器标题
		$this->load->view('topbar_view',$data);
		$this->load->view('head_view',$data);
		//输出主菜单内容
		$data['bignav']='<li class="first"><a target="_self" href="/"><span>首页</span></a></li>';
		$data['bignav']=$data['bignav'].'<li><a target="_self" href="hospital/native"><span>合作医院</span></a></li>';
		$data['bignav']=$data['bignav'].'<li><a target="_self" href="hospital/depttype"><span>推荐专科</span></a></li>	';
		$data['bignav']=$data['bignav'].'<li><a target="_self" href="#"><span>疾病指南</span></a></li>';
		$data['bignav']=$data['bignav'].'<li><a target="_self" href="exam"><span>优惠体检</span></a></li>	';
		$data['bignav']=$data['bignav'].'<li><a target="_self" href="#"><span>大河名医馆</span></a></li>';
		//输出副菜单内容
		$data['smallnav']='<li class="first"><a target="_self" href="#"><span>服务预约</span></a></li>';
		$data['smallnav']=$data['smallnav'].'<li><a target="_self" href="#"><span>在线购卡</span></a></li>	';
		$data['smallnav']=$data['smallnav'].'<li class="current"><a target="_self" href="service"><span>客服中心</span></a></li>	';
		//输出mini菜单
		$data['mininav']='<li class="first"><a target="_self" href="service#guide"><span>服务指南</span></a></li>';
		$data['mininav']=$data['mininav'].'<li><a target="_self" href="service#help"><span>帮助中心</span></a></li>';
		$data['mininav']=$data['mininav'].'<li><a target="_self" href="service#feedback"><span>意见反馈</span></a></li>';
		
		$this->load->view('nav_view',$data);
		$this->load->view('service_main_view',$data);
		$this->load->view('link_view',$data);
		$this->load->view('foot_view',$data);

	}

}
?>